/*
 * SPDX-License-Identifier: Apache-2.0
 * Copyright Red Hat Inc. and Hibernate Authors
 */
package org.hibernate.testing.orm.junit;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.ExtendWith;

/// Used in conjunction with [DomainModelProducer] to behave
/// as if [@DomainModel][DomainModel] were used.  E.g.
///
/// ```java
/// @DomainModelFunctionalTesting
/// class SomeTest implements DomainModelProducer {
///     @Override
///     MetadataImplementor produceModel(StandardServiceRegistry serviceRegistry) {
/// 	}
///
///     @Test
///     void testStuff(DomainModelScope modelScope) {
///         ...
///     }
///
///     ...
/// }
/// ```
///
/// @author Steve Ebersole
@Inherited
@Retention( RetentionPolicy.RUNTIME )
@Target({ElementType.TYPE, ElementType.METHOD})

@TestInstance( TestInstance.Lifecycle.PER_CLASS )

@ServiceRegistryFunctionalTesting

@ExtendWith( ExpectedExceptionExtension.class )
@ExtendWith( DialectFilterExtension.class )

@ExtendWith( DomainModelExtension.class )
@ExtendWith( DomainModelParameterResolver.class )
public @interface DomainModelFunctionalTesting {
}
